﻿using Production.DomainLib.AggregatesModel.ProductionPlanAggregate;
using Swimj.DomainLib.SeedWork;

namespace Production.InfrastructureLib.Repositories
{
    public class ProductionPlanRepository : IProductionPlanRepository
    {
        private readonly ProductionDbContext _context;

        public ProductionPlanRepository(ProductionDbContext context)
        {
            _context = context;
        }

        public IUnitOfWork UnitOfWork => _context;

        public ProductionPlan Add(ProductionPlan productionPlan)
        {
            return _context.ProductionPlans.Add(productionPlan).Entity;
        }
    }
}